Skip to content

fix: cp-12.18.0 discard duplicate accounts on unlock #32621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
May 15, 2025

Conversation

mikesposito
Copy link
Member

@mikesposito mikesposito commented May 7, 2025

Description

Updating @metamask/keyring-controller to ^22.0.0:

## [22.0.0]

### Changed

- **BREAKING** `keyringsMetadata` has been removed from the controller state ([#5725](https://github.com/MetaMask/core/pull/5725))
  - The metadata is now stored in each keyring object in the `state.keyrings` array.
  - When updating to this version, we recommend removing the `keyringsMetadata` state and all state referencing a keyring ID with a migration. New metadata will be generated for each keyring automatically after the update.
### Fixed
- Keyrings with duplicate accounts are skipped as unsupported on unlock ([#5775](https://github.com/MetaMask/core/pull/5775))

## [21.0.6]

### Changed

- Prevent emitting `:stateChange` from `withKeyring` unnecessarily ([#5732](https://github.com/MetaMask/core/pull/5732))

and @metamask/accounts-controller to ^29.0.0:

## [29.0.0]

### Changed

- **BREAKING:** bump `@metamask/keyring-controller` peer dependency to `^22.0.0` ([#5802](https://github.com/MetaMask/core/pull/5802))

## [28.0.0]

### Added
- Add new `setAccountNameAndSelectAccount` action ([#5714](https://github.com/MetaMask/core/pull/5714))
- Add `entropySource` and `derivationPath` to EVM HD account options ([#5618](https://github.com/MetaMask/core/pull/5618))
### Changed
- **BREAKING:** Bump `@metamask/snaps-controllers` peer dependency from `^9.19.0` to `^11.0.0` ([#5639](https://github.com/MetaMask/core/pull/5639))
- **BREAKING:** Bump `@metamask/providers` peer dependency from `^18.1.0` to `^21.0.0` ([#5639](https://github.com/MetaMask/core/pull/5639))
- Bump `@metamask/base-controller` from `^8.0.0` to `^8.0.1` ([#5722](https://github.com/MetaMask/core/pull/5722))
- Bump `@metamask/snaps-sdk` from `^6.17.1` to `^6.22.0` ([#5639](https://github.com/MetaMask/core/pull/5639))
- Bump `@metamask/snaps-utils` from `^8.10.0` to `^9.2.0` ([#5639](https://github.com/MetaMask/core/pull/5639))
- Bump `@metamask/eth-snap-keyring` from `^12.0.0` to `^12.1.1` ([#5565](https://github.com/MetaMask/core/pull/5565))
- Bump `@metamask/keyring-api` from `^17.2.0` to `^17.4.0` ([#5565](https://github.com/MetaMask/core/pull/5565))
- Bump `@metamask/keyring-internal-api` from `^6.0.0` to `^6.0.1` ([#5565](https://github.com/MetaMask/core/pull/5565))
### Fixed
- Do not fire events during `update` blocks ([#5555](https://github.com/MetaMask/core/pull/5555))
- Prevent unnecessary state updates when updating `InternalAccount.metadata.snap` ([#5735](https://github.com/MetaMask/core/pull/5735))

Open in GitHub Codespaces

Related issues

Fixes: #32935

Manual testing steps

1. Add duplicate to the wallet state

1.1. Switch to the v11.7.3 branch, build locally, and install the extension from chrome://extensions
1.2. Onboard with an SRP of which we know the second account (child guilt hollow arrive average popular nasty soon summer like scheme diary pill country rapid)
1.3. Import an account that is part of the mnemonic ( 0x80842b7e3cfb1118e86a427cdec418e3b4179ef5bbbfd71c02a76349831c8a8b which is the account at index 2 of the above SRP)
1.4. Add a new account on the main HD
1.5. Switch to Version-v12.17.1 branch, and refresh the extension in chrome://extensions
1.6. Unlock the wallet, you should see duplicates in your accounts list and you won't be able to add new accounts

2. Test the fix

2.1. Switch to this branch, build locally, and refresh the extension in chrome://extensions
2.2 Unlock the wallet, you shouldn't see duplicate accounts anymore, and you should be able to add new accounts

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Copy link

socket-security bot commented May 7, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​metamask/​accounts-controller@​27.0.0 ⏵ 29.0.091 +110075 +199 +1100
Updated@​metamask/​keyring-controller@​21.0.5 ⏵ 22.0.09210076 +1100 +2100

View full report

Copy link

socket-security bot commented May 7, 2025

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

@metamaskbot
Copy link
Collaborator

metamaskbot commented May 7, 2025

✨ Files requiring CODEOWNER review ✨

🧩 @MetaMask/extension-devs

  • lavamoat/browserify/beta/policy.json
  • lavamoat/browserify/flask/policy.json
  • lavamoat/browserify/main/policy.json
  • lavamoat/browserify/mmi/policy.json

📜 @MetaMask/policy-reviewers

  • lavamoat/browserify/beta/policy.json
  • lavamoat/browserify/flask/policy.json
  • lavamoat/browserify/main/policy.json
  • lavamoat/browserify/mmi/policy.json

🔗 @MetaMask/supply-chain

  • lavamoat/browserify/beta/policy.json
  • lavamoat/browserify/flask/policy.json
  • lavamoat/browserify/main/policy.json
  • lavamoat/browserify/mmi/policy.json

🖥️ @MetaMask/wallet-ux

  • ui/components/multichain/account-details/account-details.tsx
  • ui/components/multichain/account-list-menu/account-list-menu.test.tsx
  • ui/components/multichain/connect-accounts-modal/connect-accounts-modal.test.tsx
  • ui/components/multichain/create-snap-account/create-snap-account.test.tsx
  • ui/components/multichain/edit-accounts-modal/edit-accounts-modal.test.tsx
  • ui/components/multichain/multi-srp/srp-list/srp-list.test.tsx

@metamaskbot
Copy link
Collaborator

Builds ready [a12ebda]
UI Startup Metrics (1231 ± 67 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1231108314176712711355
load107496712325911281179
domContentLoaded106896412115811221169
domInteractive17134351725
firstPaint791147121840710941172
backgroundConnect74314712
firstReactRender20153742129
getState1464481931
initialActions001000
loadScripts82671996256873926
setupStore84243915
WebpackHomeuiStartup21521737258718922942415
load16781248203315017671882
domContentLoaded16711243202215017591871
domInteractive161164111351
firstPaint1656241269174338
backgroundConnect3410441543357
firstReactRender1465435195192333
getState144190201630
initialActions317134
loadScripts16661237201715017541857
setupStore247280382150
FirefoxBrowserifyHomeuiStartup13651149176111214291594
load12181025153710312801426
domContentLoaded12171025153710312801426
domInteractive1023924232113165
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2212178182048
firstReactRender23195872244
getState84304819
initialActions001001
loadScripts11991016152310112611408
setupStore942032668
WebpackHomeuiStartup15881392213615616871929
load13611200185514114421664
domContentLoaded13611200185514114421664
domInteractive84433963790130
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect22164862441
firstReactRender36296353945
getState135270271031
initialActions102111
loadScripts13411182183514114221641
setupStore10518017912
Benchmark value 1075 exceeds gate value 1070 for chrome browserify home mean load
Benchmark value 1068 exceeds gate value 1061 for chrome browserify home mean domContentLoaded
Benchmark value 339 exceeds gate value 334 for chrome webpack home p95 firstPaint
Benchmark value 10 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 1664 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1664 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Benchmark value 1641 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Sum of mean exceeds: 13ms | Sum of p95 exceeds: 24ms
Sum of all benchmark exceeds: 37ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 417 Bytes (0%)

@mikesposito mikesposito changed the title chore: bump @metamask/keyring-controller fix: discard duplicate accounts on unlock May 7, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [7a8160e]
UI Startup Metrics (1196 ± 56 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1196107213395612291303
load104494211555010801139
domContentLoaded103793711495110721132
domInteractive16134641624
firstPaint790135116938910631136
backgroundConnect84285722
firstReactRender19153941931
getState1353981828
initialActions001001
loadScripts79770790348826883
setupStore75202812
WebpackHomeuiStartup21861732253018723302419
load17101345228315617921923
domContentLoaded17041340227215517871917
domInteractive161170101344
firstPaint1576339554180259
backgroundConnect3010236313251
firstReactRender16255383112294351
getState144250251524
initialActions613483435
loadScripts16991336227015517821908
setupStore2862724820175
FirefoxBrowserifyHomeuiStartup13421139169211213891600
load11971017157110412411397
domContentLoaded11971017157110412411397
domInteractive983618625105155
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2214213202136
firstReactRender24205972343
getState11423429810
initialActions001001
loadScripts11771004155510312181376
setupStore64263611
WebpackHomeuiStartup15301369190213016181795
load13111178165311413701558
domContentLoaded13111178165211413691557
domInteractive78541701684110
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect22155172341
firstReactRender35284953843
getState1054561028
initialActions002111
loadScripts12921154163211413491539
setupStore14531242828
Benchmark value 23 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 175 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 12 exceeds gate value 11 for firefox browserify home mean getState
Benchmark value 15 exceeds gate value 13 for firefox webpack home mean setupStore
Sum of mean exceeds: 3ms | Sum of p95 exceeds: 115ms
Sum of all benchmark exceeds: 118ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: -110 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 474 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [ca12a89]
UI Startup Metrics (1208 ± 69 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1208108516286912481307
load105895313645810911149
domContentLoaded105195113535810851141
domInteractive16134541725
firstPaint78593135940610801146
backgroundConnect83405722
firstReactRender19154752032
getState1353581929
initialActions001001
loadScripts808712105855842894
setupStore74192712
WebpackHomeuiStartup21481725259717622712438
load16851306203613717741918
domContentLoaded16781302202713617701906
domInteractive161155101345
firstPaint1666435858189274
backgroundConnect3210263373075
firstReactRender14743353108281339
getState1144671329
initialActions512262234
loadScripts16741300200413417691881
setupStore176249241932
FirefoxBrowserifyHomeuiStartup14191205178512315031669
load12541084159711113301464
domContentLoaded12541083159711113301463
domInteractive1063728933120155
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2413135202355
firstReactRender25205982553
getState15521435931
initialActions001001
loadScripts12331070158310713081432
setupStore7437479
WebpackHomeuiStartup16011398228716116571887
load13741182197914614391645
domContentLoaded13731182197814614391644
domInteractive79381411887118
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect23167182538
firstReactRender36305653944
getState114104121029
initialActions002111
loadScripts13531167196014514211629
setupStore85284820
Benchmark value 22 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 1420 exceeds gate value 1405 for firefox browserify home mean uiStartup
Benchmark value 1255 exceeds gate value 1245 for firefox browserify home mean load
Benchmark value 1255 exceeds gate value 1239 for firefox browserify home mean domContentLoaded
Benchmark value 26 exceeds gate value 25 for firefox browserify home mean firstReactRender
Benchmark value 15 exceeds gate value 11 for firefox browserify home mean getState
Benchmark value 1234 exceeds gate value 1230 for firefox browserify home mean loadScripts
Benchmark value 1669 exceeds gate value 1660 for firefox browserify home p95 uiStartup
Benchmark value 31 exceeds gate value 24 for firefox browserify home p95 getState
Sum of mean exceeds: 50ms | Sum of p95 exceeds: 20ms
Sum of all benchmark exceeds: 70ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: -22.11 KiB (-0.41%)
  • ui: 6.43 KiB (0.09%)
  • common: 26.86 KiB (0.29%)

@metamaskbot
Copy link
Collaborator

Builds ready [4cc86df]
UI Startup Metrics (1207 ± 63 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1207108814056312601321
load105495912355910921167
domContentLoaded104895012225910871158
domInteractive16133541624
firstPaint73775123340710661165
backgroundConnect74263810
firstReactRender20153852035
getState1354271829
initialActions001001
loadScripts80569195957842918
setupStore85253815
WebpackHomeuiStartup21531764249717222692399
load16891383201312417681850
domContentLoaded16821380201012217601846
domInteractive151273101348
firstPaint1606261673181282
backgroundConnect26983133150
firstReactRender15542353106273334
getState164315311535
initialActions3112136
loadScripts16771378198612217571844
setupStore246271412142
FirefoxBrowserifyHomeuiStartup13311153176412513761620
load11931028158612412521455
domContentLoaded11931028158512412511455
domInteractive1014124935116164
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2013106132127
firstReactRender24195682250
getState84445811
initialActions001001
loadScripts11751011156112112281431
setupStore64455611
WebpackHomeuiStartup15741419208814416351871
load13551196187113914291629
domContentLoaded13551196187113914291629
domInteractive79431411788114
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect21145052231
firstReactRender36305553844
getState95315921
initialActions001011
loadScripts13361179184813814081612
setupStore85293812
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 265 Bytes (0%)
  • ui: -62 Bytes (0%)
  • common: -196 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [14df23d]
UI Startup Metrics (1202 ± 58 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1202109613975812361316
load104896311955010751154
domContentLoaded104196011895110701149
domInteractive17134151627
firstPaint739136118940810551113
backgroundConnect84345823
firstReactRender21164562237
getState1463982029
initialActions001001
loadScripts79971193749826905
setupStore84203814
WebpackHomeuiStartup21561719250718022842413
load17111300215715218071937
domContentLoaded17041293215315118021912
domInteractive16115091343
firstPaint1586240962172307
backgroundConnect359266413975
firstReactRender13242394101225322
getState164224271828
initialActions317135
loadScripts16951290215215217941896
setupStore186173232133
FirefoxBrowserifyHomeuiStartup13201125169711013901565
load11801004157810812381384
domContentLoaded11801004157810812371384
domInteractive1003918930113159
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect20137482132
firstReactRender23196072232
getState84395821
initialActions001001
loadScripts1163994156610712121369
setupStore83629634
WebpackHomeuiStartup15781406213616216621957
load13541189191414814201676
domContentLoaded13541188191414814191675
domInteractive79461431887119
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2515269262446
firstReactRender36295353847
getState95315920
initialActions002111
loadScripts13331171189514413971654
setupStore12531131821
Benchmark value 23 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 34 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 1957 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 1676 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1675 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Benchmark value 1654 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Sum of mean exceeds: 0ms | Sum of p95 exceeds: 89ms
Sum of all benchmark exceeds: 89ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 255 Bytes (0%)
  • ui: 1.84 KiB (0.03%)
  • common: -154 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [5a74b5e]
UI Startup Metrics (1219 ± 63 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1219110314866312601321
load106497112525410911167
domContentLoaded105796512435410861161
domInteractive17132831626
firstPaint75387125342310841166
backgroundConnect84435723
firstReactRender21155782242
getState15684112030
initialActions001001
loadScripts81470398352846915
setupStore85242811
WebpackHomeuiStartup21521650261218822632453
load16761312208514717611926
domContentLoaded16701308208014617531915
domInteractive1911373371342
firstPaint1716065181192294
backgroundConnect299268283561
firstReactRender14642342102275329
getState1244371527
initialActions317135
loadScripts16621307205514017511863
setupStore266336452147
FirefoxBrowserifyHomeuiStartup13361171208913913871622
load11931008192913512621427
domContentLoaded11931007192913512621427
domInteractive1013627134114172
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2313229252045
firstReactRender24186782349
getState10424925823
initialActions001001
loadScripts1173993181212812391409
setupStore8421021611
WebpackHomeuiStartup16081352210515516781956
load13731168187114314341683
domContentLoaded13721167187114314341681
domInteractive81341521890112
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect23145462537
firstReactRender37306163950
getState145309311032
initialActions002111
loadScripts13521154185214214181662
setupStore11432231912
Benchmark value 23 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 1956 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 1683 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1681 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Benchmark value 1662 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Sum of mean exceeds: 0ms | Sum of p95 exceeds: 102ms
Sum of all benchmark exceeds: 102ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 255 Bytes (0%)
  • ui: 1.91 KiB (0.03%)
  • common: -154 Bytes (0%)

mikesposito added a commit to MetaMask/core that referenced this pull request May 14, 2025
Dependent on:
- #5725

## Explanation

<!--
Thanks for your contribution! Take a moment to answer these questions so
that reviewers have the information they need to properly understand
your changes:

* What is the current state of things and why does it need to change?
* What is the solution your changes offer and how does it work?
* Are there any changes whose purpose might not obvious to those
unfamiliar with the domain?
* If your primary goal was to update one package but you found you had
to update another one along the way, why did you do so?
* If you had to upgrade a dependency, why did you do so?
-->
It is no longer possible to persist duplicates in the vault, though
users that already have duplicates will see them in the accounts list,
and won't be able to do any action with their vault. These changes aim
to discard duplicates, moving the keyring including a duplicate account
to the unsupported array.

Can be tested on extension with
MetaMask/metamask-extension#32621

## References

<!--
Are there any issues that this pull request is tied to?
Are there other links that reviewers should consult to understand these
changes better?
Are there client or consumer pull requests to adopt any breaking
changes?

For example:

* Fixes #12345
* Related to #67890
-->

## Changelog

<!--
THIS SECTION IS NO LONGER NEEDED.

The process for updating changelogs has changed. Please consult the
"Updating changelogs" section of the Contributing doc for more.
-->

## Checklist

- [ ] I've updated the test suite for new or updated code as appropriate
- [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [ ] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs),
highlighting breaking changes as necessary
- [ ] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes

---------

Co-authored-by: Mark Stacey <[email protected]>
Co-authored-by: Charly Chevalier <[email protected]>
@ziedbrini ziedbrini requested review from Gudahtt and ccharly May 15, 2025 10:10
naugtur
naugtur previously approved these changes May 15, 2025
Copy link
Contributor

@naugtur naugtur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to policy.json look safe.
Approving on behalf of supply-chain and policy-reviewers

zone-live
zone-live previously approved these changes May 15, 2025
OGPoyraz
OGPoyraz previously approved these changes May 15, 2025
matthewwalsh0
matthewwalsh0 previously approved these changes May 15, 2025
NidhiKJha
NidhiKJha previously approved these changes May 15, 2025
@mikesposito mikesposito enabled auto-merge May 15, 2025 12:27
@mikesposito mikesposito added this pull request to the merge queue May 15, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [1764055]
UI Startup Metrics (1186 ± 56 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1186106913555612251299
load103290811455110711102
domContentLoaded102590111405010631097
domInteractive16132731624
firstPaint728131114640410561102
backgroundConnect84325823
firstReactRender20157072035
getState1564592033
initialActions004101
loadScripts78666290649822860
setupStore85223816
WebpackHomeuiStartup22031772256917423112514
load17341379218414217982030
domContentLoaded17271375218014117932010
domInteractive161259111354
firstPaint1637070779175302
backgroundConnect41102825240235
firstReactRender15043342102262333
getState144173171627
initialActions317145
loadScripts17221374217814017821986
setupStore207157222239
FirefoxBrowserifyHomeuiStartup13351169172410913831584
load11941009156210912401417
domContentLoaded11941009156110912401416
domInteractive1023626334114177
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2214218212130
firstReactRender24196482352
getState84769810
initialActions002001
loadScripts1175991153110612221396
setupStore6432367
WebpackHomeuiStartup15491381197113816321861
load13271187172612714191630
domContentLoaded13271187172512714191630
domInteractive83374324684129
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect23147482443
firstReactRender35294843746
getState105306929
initialActions102111
loadScripts13081172170712813981615
setupStore13521629928
Benchmark value 23 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 2203 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 1735 exceeds gate value 1711 for chrome webpack home mean load
Benchmark value 1727 exceeds gate value 1704 for chrome webpack home mean domContentLoaded
Benchmark value 42 exceeds gate value 40 for chrome webpack home mean backgroundConnect
Benchmark value 1722 exceeds gate value 1699 for chrome webpack home mean loadScripts
Benchmark value 2514 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 2031 exceeds gate value 2030 for chrome webpack home p95 load
Benchmark value 2010 exceeds gate value 2005 for chrome webpack home p95 domContentLoaded
Benchmark value 235 exceeds gate value 90 for chrome webpack home p95 backgroundConnect
Benchmark value 1987 exceeds gate value 1970 for chrome webpack home p95 loadScripts
Sum of mean exceeds: 83ms | Sum of p95 exceeds: 233ms
Sum of all benchmark exceeds: 316ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1004 Bytes (0.02%)
  • ui: -62 Bytes (0%)
  • common: -239 Bytes (0%)

Copy link
Contributor

@ccharly ccharly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Regarding the discussion here about account.options.entropySource, here are some technical details and logs on why we will need to re-onboard the wallet (for internal users/QA):

  • Solana accounts set the entropySource in their account.options
  • We have no easy way to migrate those account.options for now, because the AccountsController re-create the InternalAccounts list based on keyring's accounts
  • Keyring's state (here, the Snap keyring), cannot be migrated, since it's part of the vault (encrypted)
  • Thus making it impossible to update the account.options.entropySource with the new generated entropy source ID

This means, that, after this PR gets merged, existing Solana accounts won't be usable (and they cannot be fixed). Also, we cannot remove Solana accounts anymore, leaving us with only one option, re-onboard the wallet.

This will make sure that the new Solana accounts will be using the proper entropySource, thus fixing the initial problem.

Merged via the queue into main with commit a4c4274 May 15, 2025
156 checks passed
@mikesposito mikesposito deleted the mikesposito/fix/unsupported-keyrings branch May 15, 2025 13:10
@github-actions github-actions bot locked and limited conversation to collaborators May 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
regression-RC-12.18.0 Regression bug that was found in release candidate (RC) for release 12.18.0 release-12.18.0 Issue or pull request that will be included in release 12.18.0 release-12.19.0 team-wallet-framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Duplicate accounts in the vault break some user actions